package com.irdstudio.apicenter.gateway.util.push;

import org.apache.commons.lang3.Validate;

/**
 * 个推推送参数对象
 * @author ZhangHao
 * @since 1.0
 * @date 2015.8.21
 *
 */
public class PushCfg {

	private String appId;
	private String pushAppId;
	private String url;
	private String appKey;
	private String masterSecret;
	
	
	public PushCfg() {
//		this.pushAppId = "M4axNad0oA6Bj5EMSuOJr4";
//		this.appKey = "48SA3VnYr77IxAY0CDiOF1";
//		this.masterSecret = "PymG9FVurLAAi0ykRLlO7";
//		this.url = "http://sdk.open.api.igexin.com/serviceex";
	}
	
	
	
	public PushCfg(String appId, String pushAppId, String url, String appKey,
			String masterSecret) {
		super();
		this.appId = appId;
		this.pushAppId = pushAppId;
		this.url = url;
		this.appKey = appKey;
		this.masterSecret = masterSecret;
	}



	public String getAppId() {
		return appId;
	}
	public void setAppId(String appId) {
		this.appId = appId;
	}
	public String getPushAppId() {
		return pushAppId;
	}
	public void setPushAppId(String pushAppId) {
		this.pushAppId = pushAppId;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getAppKey() {
		return appKey;
	}
	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}
	public String getMasterSecret() {
		return masterSecret;
	}
	public void setMasterSecret(String masterSecret) {
		this.masterSecret = masterSecret;
	}



	@Override
	public String toString() {
		return "PushCfg [appId=" + appId + ", pushAppId=" + pushAppId
				+ ", url=" + url + ", appKey=" + appKey + ", masterSecret="
				+ masterSecret + "]";
	}
	
	public void notEmpty() {
		Validate.notEmpty(appId, "PushCfg.appId is empty.");
		Validate.notEmpty(pushAppId, "PushCfg.pushAppId is empty.");
		Validate.notEmpty(url, "PushCfg.url is empty.");
		Validate.notEmpty(appKey, "PushCfg.appKey is empty.");
		Validate.notEmpty(masterSecret, "PushCfg.masterSecret is empty.");
	}
	
}
